package demo1;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in) ;
        System.out.println(!scanner.hasNext());
        while (!scanner.hasNext()){
            scanner.close();
            System.out.println(scanner.hasNext());
            String s = scanner.next() ;
            System.out.println(s);
        }
    }
}
